package com.wei.service.impl;

import java.util.List;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.github.pagehelper.PageHelper;
import com.github.pagehelper.PageInfo;
import com.wei.entity.Information;
import com.wei.mapper.InformationMapper;
import com.wei.service.InformationService;

@Service
public class ImformationServiceImpl extends ServiceImpl<InformationMapper, Information> implements InformationService{

	
	private static final Logger log = LoggerFactory.getLogger(ImformationServiceImpl.class);

	
	@Autowired
	private InformationMapper inMapper;
	
	@Override
	public void readExcelFile(List<Information> infos) {
		// TODO Auto-generated method stub
		log.info("Information = " + infos);
	}

	@Override
	public void WriteExcelFile() {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<Information> exportBy100w(Integer pageNum, Integer pageSize) {
		// TODO Auto-generated method stub
//		PageHelper.startPage(pageNum, pageSize);
//		List<Information> list = inMapper.selectList(new QueryWrapper<>());
//		PageInfo<Information> pageInfo = new PageInfo<>(list);
//        return pageInfo.getList();
		List<Information> list = inMapper.findByPage(pageNum,pageSize);
		return list;
	}

}
